package com.tfjybj.msg.commons.entity.table;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;

/**
 * @Description:
 * @Author: xuziguo
 * @Date: 2021/4/19 下午 7:42
 * @Modified By:
 * @Modify Date:
 */
@EntityListeners(AuditingEntityListener.class) //自定义实体的id策略-用雪花算法用
@Entity
@Table(name = "receiver", schema = "msg_v2_dev")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ReceiverEntity {

    @Id
    @CreatedBy
    @Column(name = "id")
    private String id;

    @Column(name = "message_id")
    private String messageId;

    @Column(name = "receiver")
    private String receiver;

}
